%%
%% This is file `xcolor-patch.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hycolor.dtx  (with options: `xcolor')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2007-2009 by
%%    Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% This Current Maintainer of this work is Heiko Oberdiek.
%% 
%% This work consists of the main source file hycolor.dtx
%% and the derived files
%%    hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv,
%%    xcolor-patch.sty, hycolor-test1.tex, hycolor-test2.tex,
%%    hycolor-test3.tex, hycolor-test-xcol1.tex,
%%    hycolor-test-xcol2.tex, hycolor-test-xcol3.tex,
%%    hycolor-test-xcol4.tex.
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xcolor-patch}[2009/12/12 xcolor patch]
\@ifpackageloaded{xcolor}{%
  \@firstofone
}{%
  \@ifpackageloaded{scrlfile}{%
    \AfterPackage{xcolor}%
  }{%
    \def\reserved@a{%
      \edef\x{%
        \endgroup
        \noexpand\AtBeginDocument{%
          \noexpand\@ifpackageloaded{xcolor}{\the\toks@}{}%
        }%
      }%
      \x
    }%
    \begingroup
    \afterassignment\reserved@a
    \toks@
  }%
}%
{%
  \long\def\reserved@a#1#2#3{%
    \long\def\@@tmp##1##2{%
      \ifx#1##1%
        \toks@{##2}%
        \expandafter\remove@to@nnil
      \else
        \expandafter\@@tmp
      \fi
    }%
    \@@tmp#2#1{#3}\@nnil\the\toks@
  }%
  \ifx\XC@ifxcase\reserved@a
    \long\def\XC@ifxcase#1#2#3{%
      \long\def\XC@if@##1##2{%
        \ifx#1##1%
          \toks@{##2}%
          \expandafter\remove@to@nnil
        \else
          \expandafter\XC@if@
        \fi
      }%
      \XC@if@#2#1{#3}\@nnil
      \the\toks@
    }%
  \fi
  \long\def\reserved@a#1#2#3{%
    \long\def\@@tmp##1##2{%
      \@expandtwoargs\in@{,#1,}{,##1,}%
      \ifin@
        \toks@{##2}%
        \expandafter\remove@to@nnil
      \else
        \expandafter\@@tmp
      \fi
    }%
    \@@tmp#2{#1}{#3}\@nnil
    \the\toks@
  }%
  \ifx\XC@ifcase\reserved@a
    \long\def\XC@ifcase#1#2#3{%
      \long\def\XC@if@##1##2{%
        \@expandtwoargs\in@{,#1,}{,##1,}%
        \ifin@
          \toks@{##2}%
          \expandafter\remove@to@nnil
        \else
          \expandafter\XC@if@
        \fi
      }%
      \XC@if@#2{#1}{#3}\@nnil
      \the\toks@
    }%
  \fi
  \def\reserved@a#1,{%
    \XC@ifxcase\tm{%
      \XC@mod@rgb{%
        \XC@calcN{#1}\@@tmp
        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
      }%
      \XC@mod@cmy{%
        \XC@calcC{#1}\@@tmp
        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
      }%
      \XC@mod@cmyk{%
        \XC@calcC{#1}\@@tmp
        \edef\@@tmp{0,0,0,\@@tmp}%
      }%
      \XC@mod@RGB{%
        \edef\@@scl{\rangeRGB}%
        \XC@calcM{#1}\@@tmp
        \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
      }%
      \XC@mod@HTML{%
        \edef\@@scl{\@cclv}%
        \XC@calcM{#1}\@@tmp
        \XC@calcH\@@tmp\@@tmp
        \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
      }%
      \XC@mod@HSB{%
        \edef\@@scl{\rangeHSB}%
        \XC@calcM{#1}\@@tmp
        \edef\@@tmp{0,0,\@@tmp}%
      }%
      \XC@mod@Gray{%
        \edef\@@scl{\rangeGray}%
        \XC@calcM{#1}\@@tmp
      }%
    }%
    {%
      \XC@calcN{#1}\@@tmp
      \edef\@@tmp{0,0,\@@tmp}%
    }%
  }%
  \ifx\XC@cnv@gray\reserved@a
    \def\XC@cnv@gray#1,{%
      \XC@ifxcase\tm{%
        \XC@mod@rgb{%
          \XC@calcN{#1}\@@tmp
          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
        }%
        \XC@mod@gray{}%
        \XC@mod@cmy{%
          \XC@calcC{#1}\@@tmp
          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
        }%
        \XC@mod@cmyk{%
          \XC@calcC{#1}\@@tmp
          \edef\@@tmp{0,0,0,\@@tmp}%
        }%
        \XC@mod@RGB{%
          \edef\@@scl{\rangeRGB}%
          \XC@calcM{#1}\@@tmp
          \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
        }%
        \XC@mod@HTML{%
          \edef\@@scl{\@cclv}%
          \XC@calcM{#1}\@@tmp
          \XC@calcH\@@tmp\@@tmp
          \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
        }%
        \XC@mod@HSB{%
          \edef\@@scl{\rangeHSB}%
          \XC@calcM{#1}\@@tmp
          \edef\@@tmp{0,0,\@@tmp}%
        }%
        \XC@mod@Gray{%
          \edef\@@scl{\rangeGray}%
          \XC@calcM{#1}\@@tmp
        }%
      }%
      {%
        \XC@calcN{#1}\@@tmp
        \edef\@@tmp{0,0,\@@tmp}%
      }%
    }%
  \fi
  \@ifundefined{XC@frameb@x }{%
    \expandafter\let\csname XC@frameb@x \endcsname\XC@frameb@x
    \edef\XC@frameb@x{%
      \noexpand\protect
      \expandafter\noexpand\csname XC@frameb@x \endcsname
    }%
    \expandafter\ifx\csname XC@frameb@x \endcsname\@frameb@x
      \let\@frameb@x\XC@frameb@x
    \fi
  }{}%
}
\endinput
%%
%% End of file `xcolor-patch.sty'.
